package com.choosefine.it.basedata.service;

import com.choosefine.it.basedata.dao.RegionMapper;
import com.choosefine.it.basedata.model.Region;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 地区service
 * @author guwenwei
 *
 */
@Service("regionService")
public class RegionService{

	@Autowired
	private RegionMapper regionMapper;

	public List<Region> getRegionsByFather(String father) {
		return regionMapper.selectRegionsByFather(father);
	}

	public int deleteByPrimaryKey(Integer id) {

		return regionMapper.deleteByPrimaryKey(id);
	}

	public Region findByPrimaryKey(Integer id) {

		return regionMapper.selectByPrimaryKey(id);
	}

	public List<Region> selectAll() {

		return regionMapper.selectAll();
	}

	public Region selectByRegionID(String regionid) {
		return regionMapper.selectByRegionID(regionid);
	}


}